<?php

class DepositAmountField extends NumericField {
	function getAttributes() {
        return array_merge(
            parent::getAttributes(), array(
            	'rel' => 'depositamount',
                'data-inputmask-allowminus' => 'false'
            )
        );
    }
	
	function Type() {
		return parent::Type() . ' depositamount';
	}
	
    function validate($validator) {
        $amount = $this->value;
        if($amount <= 0) {
            $validator->validationError(
            	$this->getName(), 
            	_t('DepositAmountField.INVALID_AMOUNT', 'Invalid deposit amount'), 
            	'warning'
			);
            return false;
        }

        return true;
    }
}
